<%@page import="java.security.SecureRandom"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>admin管理商品页面</title>
<!-- script  -->
<script language="javascript" src="/huahua/resources/js/city.js"></script>
<!-- Favicon  -->
<link rel="icon" href="/huahua/resources/images/core-img/favicon.ico">

<!-- Core Style CSS -->
<link rel="stylesheet" href="/huahua/resources/css/core-style.css">
<script type="text/javascript"
	src="resources/js/jquery/jquery-2.2.4.min.js"></script>
</head>
<body>
	<!-- ##### Header Area Start ##### -->
	<header class="header_area">
		<div
			class="classy-nav-container breakpoint-off d-flex align-items-center justify-content-between">
			<!-- Classy Menu -->
			<nav class="classy-navbar" id="essenceNav">
				<!-- Logo -->
				<a class="nav-brand" href="http://localhost:8080/huahua/pages/front/adminHome.jsp"><img
					src="/huahua/resources/images/core-img/logo.png" alt="http://localhost:8080/huahua/pages/front/adminHome.jsp"></a>
				<!-- Navbar Toggler -->
				<div class="classy-navbar-toggler">
					<span class="navbarToggler"><span></span><span></span><span></span></span>
				</div>
				<!-- Menu -->
				<div class="classy-menu">
					<!-- close btn -->
					<div class="classycloseIcon">
						<div class="cross-wrap">
							<span class="top"></span><span class="bottom"></span>
						</div>
					</div>
					<!-- Nav Start -->
					
					<!-- Nav End -->
				</div>
			</nav>
			<!-- Header Meta Data -->
			 

		</div>
	</header>
<div class="breadcumb_area breadcumb-style-two bg-img"
			style="background-image: url(/huahua/resources/images/bg-img/blog4.jpg);">
			<div class="container h-100">
				<div class="row h-100 align-items-center">
					<div class="col-12">
						<div class="page-title text-center">
							<h2>admin管理页面</h2>
						</div>
					</div>
				</div>
			</div>
		</div>

<a href="${ pageContext.request.contextPath }/pages/admin/good_add.jsp ">插入新商品</a>
<a  href="http://localhost:8080/huahua/pages/front/adminHome.jsp">返回主页</a>

					
					
 
			</div>
			<!-- Related Blog Post -->
		
		</div>
<table border="1" width="1200" align="center">
			<tr>
				<th>ID</th><th>名字</th>
				<th>颜色</th>
				<th>品牌</th>
				<th>描述</th>
				<th>价格</th>
				<th>创建时间</th>

				<th>详情</th>
			</tr>

			<c:forEach items="${ list }" var="good">
			<tr>
   			    <td><c:out value="${good.goodId}"/></td>
  		 		<td><c:out value="${good.goodName}"/></td>
			    <td><c:out value="${good.goodColour}"/></td>
			    <td><c:out value="${good.goodBrand}"/></td>
			    <td><c:out value="${good.goodDesc}"/></td>
			    <td><c:out value="${good.goodPrice}"/></td>
			    <td><c:out value="${good.createTime}"/></td>
			  
				<td><a href="${ pageContext.request.contextPath }/admin/getGoodDetails.shtml?id=${good.goodId} ">详情</a></td>
			</tr>
			</c:forEach>
			</table>

					<c:if test="${ pageNum == 1 }">
						首页&nbsp;上一页
					</c:if>
					<c:if test="${ pageNum > 1 }">
						<a href="${pageContext.request.contextPath}/admin/admin_good.shtml?pageNum=1">首页</a>
						<a href="${ pageContext.request.contextPath }/admin/admin_good.shtml?pageNum=${ pageNum - 1 }">上一页</a>
					</c:if>
					<c:if test="${ pageNum == pageCount }">
						下一页&nbsp;末页
					</c:if>
					<c:if test="${ pageNum < pageCount }">
						<a href= "${pageContext.request.contextPath}/admin/admin_good.shtml?pageNum=${ pageNum + 1 }">下一页</a>
						<a href= "${ pageContext.request.contextPath }/admin/admin_good.shtml?pageNum=${ pageCount }">末页</a>
					</c:if>
			
			
<br>


